const data = [
	{ title:'我的组件', name:'my', icon:'icon-workbench', children:[
		{ title:'标题', path:'/my/title', icon:'icon-workbench'},
	]},
	{ title:'Antd 组件', name:'antd', icon:'icon-workbench', children:[
		{ title:'Tabs', url:'/antd/tabs',icon:'icon-workbench'},
		{ title:'Dropdown', name:'dropdown',icon:'icon-workbench'},
	]},
	{ title:'表单提交', name:'form-submit', icon:'icon-workbench', children:[
		{ title:'基本表单', name:'form', icon:'icon-workbench' },
		{ title:'表单验证', name:'form-valid', icon:'icon-workbench' },
	]},
	{ title:'搜索表单', name:'form-search', icon:'icon-workbench', children:[
		{ title:'基本操作', name:'form', icon:'icon-workbench' },
		{ title:'多选联动', name:'checkbox', icon:'icon-workbench' },
		{ title:'菜单管理', name:'menu', icon:'icon-workbench' },
	]},
	{ title:'按钮操作', name:'controls-button', icon:'icon-workbench', children:[
		{ title:'基本操作', name:'page', icon:'icon-workbench' },
		{ title:'盒子上的按钮', name:'box', icon:'icon-workbench' },
		{ title:'按钮权限', name:'permission', icon:'icon-workbench', meta:{ permissions:['add'] } },
	]},
	{ title:'表格操作', name:'table', icon:'icon-workbench', children:[
		{ title:'编辑表格', name:'table-edit', icon:'icon-workbench' },
		{ title:'嵌套表格', name:'table-nest', icon:'icon-workbench' },
	]},
	{ title:'弹窗操作', name:'modal', icon:'icon-workbench', children:[
		{ title:'弹窗表单', name:'submit-modal', icon:'icon-workbench', children: [
			{ title:'全局弹窗', name:'global', icon:'icon-workbench' },
			{ title:'局部弹窗', name:'local', icon:'icon-workbench' }
		] },
		{ title:'弹窗表格', name:'table-modal', icon:'icon-workbench', children: [
			{ title:'全局弹窗', name:'global', icon:'icon-workbench' },
			{ title:'局部弹窗', name:'local', icon:'icon-workbench' }
		]},
		{ title:'图片预览', name:'image-modal', icon:'icon-workbench', children: [
			{ title:'全局弹窗', name:'global', icon:'icon-workbench' },
			{ title:'局部弹窗', name:'local', icon:'icon-workbench' }
		]},
		{ title:'自定义弹窗', name:'my-modal', icon:'icon-workbench' },
		{ title:'自定义弹窗头', name:'my-modal-header', icon:'icon-workbench' },
	]}
]
const meta = {  keepAlive:true }
const noCache = {  keepAlive:false }
const childRouter = [
	// { title:'字典数据', 		name:'/main/system/configure/dic/data', meta },
	// { title:'合同评审', 		name:'/main/workbench/flow/flow-wait/review', meta },
	// { title:'查看流程详情', 	name:'/main/workbench/flow/flow-my/detail', meta },
	// { title:'发起流程', 		name:'/main/workbench/start-flow/add', meta, component:'/main/sale/agree-sale/add' },
]
const Index = {
	async getMenu( isLogin ){
		return await $.getDymaicMenu({ 
			rootPath: '/main',			// 框架访问根路径
			hasFolder: false,			// 框架访问根路径是否有目录
			childRouter, 				// 子路由
			isLogin, 					// 是登录处使用
			data, 						// 静态单数据
			// api:'/menu',				// 动态菜单数据
		})
	}
}
export default Index